#include "Signal.h"
#include "MPC_EW1D_PatternedW_b.h"
#include <vector>

using namespace std;

int main(int argc, char** argv){
  double r2_set = atof(argv[1]);
  double q_r2   = atof(argv[2]);
  double m2_set = atof(argv[3]);
  double q_m2   = atof(argv[4]);
  double dt     = atof(argv[5]);

  MathFunction *f = new eq_f(r2_set,    //i_r2_set
			     q_r2,    //i_q_r2,
	                     m2_set,   //i_m2_set,
          	             q_m2,    //i_q_m2,
	                     dt,    //i_dt,
	                     20001,  //i_mode,
	                     40000,  //i_LatticeSize,
	                     40000,  //i_Xmax,
	                     5       //i_Freq
			     );
  double ALL_ZEROS[20001] = {0};
  f->parameterize(0,ALL_ZEROS);
  f->parameterize(1,ALL_ZEROS);
  f->parameterize(2,ALL_ZEROS);
  f->parameterize(3,ALL_ZEROS);
  double x_min[2] = {0.04,0.0};
  double x_max[2] = {1.00,1.0};
  double dx[2]    = {0.04,0.04};
  MathFunction_plot(f,x_min,x_max,dx,2,"ControllerModel1_plot.dat");
}